#ifndef ____R_H__
#define ____R_H__

#include "ScnsConfig.h"

#if defined(SCNS_OV5640_ENABLE)&&SCNS_OV5640_ENABLE==1

#if defined(SCNS_SHORT_REG)
#error
#endif
#define SCNS_SHORT_REG

#ifndef __SCNS_OV5640_H__
#error
#endif

#ifndef __SCNS_OV5640_C_H__
#error
#endif

#define __R_SYSTEM_RESET_02     0x3002

#define __R_CLOCK_ENABLE_02     0x3006

#define __R_SYSTEM_CTROL0       0x3008

#define __R_SC_PLL_CONTRL2      0x3036

#define __R_SCCB_SYSTEM_CTRL_1  0x3103

#define __R_AWB_R_GAIN_H        0x3400
#define __R_AWB_R_GAIN_L        0x3401

#define __R_AWB_G_GAIN_H        0x3402
#define __R_AWB_G_GAIN_L        0x3403

#define __R_AWB_B_GAIN_H        0x3404
#define __R_AWB_B_GAIN_L        0x3405

#define __R_AWB_MANUAL_CONTROL  0x3406

#define __R_AEC_PK_EXPOSURE_0   0x3500
#define __R_AEC_PK_EXPOSURE_1   0x3501
#define __R_AEC_PK_EXPOSURE_2   0x3502

#define __R_AEC_PK_MANUAL       0x3503

#define __R_AEC_PK_REAL_GAIN_H  0x350A
#define __R_AEC_PK_REAL_GAIN_L  0x350B

#define __R_TIMING_HS_H         0x3800
#define __R_TIMING_HS_L         0x3801

#define __R_TIMING_VS_H         0x3802
#define __R_TIMING_VS_L         0x3803

#define __R_TIMING_HW_H         0x3804
#define __R_TIMING_HW_L         0x3805

#define __R_TIMING_VH_H         0x3806
#define __R_TIMING_VH_L         0x3807

#define __R_TIMING_DVPHO_H      0x3808
#define __R_TIMING_DVPHO_L      0x3809

#define __R_TIMING_DVPVO_H      0x380A
#define __R_TIMING_DVPVO_L      0x380B

#define __R_TIMING_HTS_H        0x380C
#define __R_TIMING_HTS_L        0x380D

#define __R_TIMING_VTS_H        0x380E
#define __R_TIMING_VTS_L        0x380F

#define __R_TIMING_HOFFSET_H    0x3810
#define __R_TIMING_HOFFSET_L    0x3811

#define __R_TIMING_VOFFSET_H    0x3812
#define __R_TIMING_VOFFSET_L    0x3813

#define __R_TIMING_X_INC        0x3814
#define __R_TIMING_Y_INC        0x3815

#define __R_TIMING_TC_REG_20    0x3820
#define __R_TIMING_TC_REG_21    0x3821

#define __R_AEC_GAIN_CEILING_H  0x3A18
#define __R_AEC_GAIN_CEILING_L  0x3A18

#define __R_FORMAT_CONTROL      0x4300

#define __R_VFIFO_HSIZE_H       0x4602
#define __R_VFIFO_HSIZE_L       0x4603

#define __R_VFIFO_VSIZE_H       0x4604
#define __R_VFIFO_VSIZE_L       0x4605

#define __R_JPEG_CTRL07         0x4407

#define __R_ISP_CONTROL_00      0x5300

#define __R_FORMAT_CONTROL_MUX  0x501F

#define __R_PRE_ISP_TEST        0x503D

#define __R_BLANK_LINES 8
#define __R_DUMMY_LINES 6

#define __R_BLANK_COLUMNS 0
#define __R_DUMMY_COLUMNS 16

#define __R_SENSOR_WIDTH 2624
#define __R_SENSOR_HEIGHT 1964

#define __R_ACTIVE_SENSOR_WIDTH (__R_SENSOR_WIDTH - __R_BLANK_COLUMNS - (2 * __R_DUMMY_COLUMNS))
#define __R_ACTIVE_SENSOR_HEIGHT (__R_SENSOR_HEIGHT - __R_BLANK_LINES - (2 * __R_DUMMY_LINES))

#define __R_DUMMY_WIDTH_BUFFER 16
#define __R_DUMMY_HEIGHT_BUFFER 8

#define __R_HSYNC_TIME 252
#define __R_VYSNC_TIME 24

#endif
#endif
